﻿@model CapaEntidades.entProducto

@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <script src="../../Script/jquery-1.7.1.js" type="text/javascript"></script>
    <title>NuevoProducto</title>

    <script type="text/javascript">
        $(document).ready(function () {
            var searchBox = $('#txtTexto');
            searchBox.focus(
            function () {
                if (searchBox.val() == this.title) {
                    searchBox.removeClass("defaultText");
                    searchBox.val("");
                }
            });

            searchBox.blur(
            function () {
                if (searchBox.val() == "") {
                    searchBox.addClass("defaultText");
                    searchBox.val(this.title);
                }
            });
            searchBox.blur();
        });
    </script>
</head>
<body>
    
    
    
    @using (Html.BeginForm()) {
        @Html.ValidationSummary(true)
    
        <fieldset>

            <legend>Mantenedor de Productos</legend>   
             

            <div class="editor-label">
                @Html.LabelFor(model => model.Codigo)
            </div>
            <div class="editor-field">
                <span id="txtTexto" title ="Ingresar aqui el codigo"  class="defaultText" >
                    @Html.EditorFor(model => model.Codigo)
                </span>
                @Html.ValidationMessageFor(model => model.Codigo)
            </div>
    
            <div class="editor-label">
                @Html.LabelFor(model => model.Descripcion)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Descripcion)
                @Html.ValidationMessageFor(model => model.Descripcion)
            </div>
    
            <div class="editor-label">
                @Html.LabelFor(model => model.Precio)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Precio)
                @Html.ValidationMessageFor(model => model.Precio)
            </div>
    
            <div class="editor-label">
                @Html.LabelFor(model => model.Stock)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Stock)
                @Html.ValidationMessageFor(model => model.Stock)
            </div>
    
            <div class="editor-label">
                @Html.LabelFor(model => model.Imagen)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Imagen)
                @Html.ValidationMessageFor(model => model.Imagen)
            </div>
    
            <div class="editor-label">
                @Html.LabelFor(model => model.idMarca)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.idMarca)
                @Html.ValidationMessageFor(model => model.idMarca)
            </div>
            <p>
                <input type="submit" value="Create" />
            </p>
        </fieldset>
    }
    
    <div>
        @Html.ActionLink("Back to List", "Index")
        <input type="text" id="txtTexto" title ="ingtreser"  class="defaultText" />
    
    </div>
</body>
</html>
